package main

import (
	"gin/common/lib"
	"gin/config"
	"gin/routes"
	"github.com/sirupsen/logrus"
	"os"
	"os/signal"
	"syscall"
)

func main() {

	config.KeyConfig()
	config.HttpConf()
	config.Database()
	config.Redis()
	config.RabbitMQ()
	config.ModeConf()
	config.TimeZoneConfig()
	config.MinIOCof()

	lib.Init()

	routes.HttpServerRun()

	quit := make(chan os.Signal)
	signal.Notify(quit, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
	<-quit
	logrus.Error("HttpServer exit")
}
